<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"   
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
   
   	<f:metadata>	   	
	   	<f:viewParam name="firstResult" value="#{dictList.firstResult}"></f:viewParam>	
	   	<f:viewParam name="title" value="#{dictList.title}"></f:viewParam>	
	   	<f:event listener="#{assessClassList.setMaxResults(9999999)}" type="preRenderView"></f:event>
	   	<f:viewParam name="assessClassId" value="#{dictList.assessClassId}"></f:viewParam>	
	   	<f:viewParam name="calcMethod" value="#{dictList.calcMethod}"></f:viewParam>	
	   	<f:viewParam name="moduleName" value="评价事项管理"></f:viewParam>
   	</f:metadata>
   
   	<ui:define name="content">
   
		<h:form id="searchForm">
			<div style="height:50px;margin-left:10px">				
				<p:outputLabel value="事项标题："></p:outputLabel>				
				<p:inputText value="#{dictList.title}"></p:inputText>
				#{' '}
				<p:outputLabel for="assessClass" value="所属评价类别：" />				
				<p:selectOneMenu id="assessClass" value="#{dictList.assessClassId}" >
					<f:selectItem itemLabel="-请选择-" itemValue="#{null}"/>
					<f:selectItems value="#{assessClassList.resultList}" var="_ac" itemLabel="#{_ac.name}" itemValue="#{_ac.id}"></f:selectItems>
				</p:selectOneMenu>
				#{' '}
				<p:outputLabel  value="计算方式：" />				
				<p:selectOneMenu  value="#{dictList.calcMethod}" >
					<f:selectItem itemLabel="-请选择-" itemValue="#{null}"/>
					<f:selectItems value="#{enumUtils.getEnumArray('CalcMethod')}" 
									var="_calc"	
									itemLabel="#{_calc.typeName}"
									itemValue="#{_calc}"/>
				</p:selectOneMenu>
				<div class="actionButtons">
					<p:commandButton value="查询" ajax="false"  action="DictList.xhtml?faces-redirect=true&amp;includeViewParams=true&amp;firstResult=0" styleClass="blue-int"></p:commandButton>
					<p:button value="重置" outcome="DictList.xhtml"></p:button>
				</div>				
				<div class="clearbt"></div>
			</div>
			
			<p:panel id="searchResult">
				<f:facet name="header">评价事项管理</f:facet>
				<p:dataTable value="#{dictList.resultList}" var="_dict">
					<p:column>
						<f:facet name="header">评价事项标题</f:facet>
						<h:outputText value="#{_dict.title}" />						
					</p:column>
					
					<p:column width="100">
						<f:facet name="header">填报周期</f:facet>
						<h:outputText value="#{_dict.periodType.typeName }" />						
					</p:column>	
								
					<p:column>
						<f:facet name="header">事项所属类别</f:facet>
						<h:outputText value="#{_dict.assessClass.name}" />						
					</p:column>
					
					<p:column width="80">
						<f:facet name="header">事项类型</f:facet>
						<h:outputText value="#{_dict.calcMethod.typeName}" />						
					</p:column>
					
					<p:column style="text-align: center;width:100px;">
						<f:facet name="header">操作</f:facet>
						<p:button  outcome="DictEdit.xhtml" value="编辑">							
							<f:param name="dictId" value="#{_dict.id}"></f:param>
						</p:button>
					</p:column>
				</p:dataTable>
			</p:panel>
			
			<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
				<ui:param name="entityList" value="#{dictList}" />
			</ui:include>
		</h:form>
		
		<p:button href="DictEdit.xhtml" value="新增评价事项"></p:button>
      
   	</ui:define>
</ui:composition>
